﻿using LiteExpress.Demo.Business;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LiteExpress.Core.WebDemo.Controllers
{
    public class HomeController : Controller
    {
        static IUserService _userService;
        static IOrganService _orgService;

        public HomeController(IOrganService orgService, IUserService userService)
        {
            _userService = userService;
            _orgService = orgService;
        }
        
        public ActionResult Index(long orgID)
        {
            var result = _orgService.Select(orgID);
            var result2 = _userService.TestSql();
            return Json(new {result1 = result, result2 = result2 }, JsonRequestBehavior.AllowGet);
        }
    }
}